# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
# NOTE: ensure compatibility with py3-flake8! (#11378)
pkgname=py3-pyflakes
_pkgname=${pkgname#py3-}
pkgver=2.4.0
pkgrel=0
pkgdesc="passive checker of Python programs"
url="https://github.com/pyflakes/pyflakes"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-pyflakes" # Backwards compatibility
provides="py-pyflakes=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	ln -s pyflakes "$pkgdir"/usr/bin/pyflakes-3

	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

sha512sums="
f4c6512eb811511c897623f52c4f88e50275a3292582d7dd34462e90e39fecce939818cb92e750eebdd66eab25b91c23540104fc4530c42621d7cfeb1d33c577  pyflakes-2.4.0.tar.gz
"
